import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    uni(),
  ],
  transpileDependencies: ['luch-request'],
  // @配置
  alias: {
    '@': path.resolve(__dirname, 'src')
  },
  // 代理
  server: {
    proxy: {
      '/api': {
        target: 'https://z.bc888.cn/api',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      }
    }
  }
})
